import request from '@/utils/axios'
import {
    URL_API
} from '@/utils/mUtils'
const base = URL_API()
// const base = 'http://101.200.164.94:8999'

//模板列表
export function reqPrintPageList(params) {
    return request({
        url: `${base}/api/document_template/list`,
        method: "post",
        data: params,
    });
}

//新增模板
export function reqAddPrintPage(params) {
    return request({
        url: `${base}/api/document_template/create`,
        method: "post",
        data: params,
    });
}

//获取客户列表
export function reqCustomerList(params) {
    return request({
        url: `${base}/api/company/customer/box`,
        method: "post",
        data: params,
    });
}

//获取运单打印的字段列表
export function reqFieldList(params) {
    return request({
        url: `${base}/api/waybill/data/print`,
        method: "post",
        data: params,
    });
}

//获取订单打印的字段列表
export function reqOrderFieldList(params) {
    return request({
        url: `${base}/api/order/data/print`,
        method: "post",
        data: params,
    });
}

//查看模板详情
export function reqPrintPageDetail(params) {
    return request({
        url: `${base}/api/document_template/detail`,
        method: "post",
        data: params,
    });
}

//修改模板
export function reqModifyPrintPage(params) {
    return request({
        url: `${base}/api/document_template/update`,
        method: "put",
        data: params,
    });
}

//删除模板
export function reqDeletePrintPage(params) {
    return request({
        url: `${base}/api/document_template/delete`,
        method: "delete",
        data: params,
    });
}
// 系统配置列表
export function settingList(params) {
    return request({
        url: `${base}/api/system/setting/list`,
        method: "post",
        data: params,
    });
}
// 系统配置保存
export function settingCreate(params) {
    return request({
        url: `${base}/api/system/setting/update`,
        method: "post",
        data: params,
    });
}

// 获取系统配置必填项字段值
export function reqRequiredField(params) {
    return request({
        url: `${base}/api/system_setting/item_info`,
        method: "post",
        data: params,
    });
}
// 
export function numberRule(params) {
    return request({
        url: `${base}/api/system/setting/check/order/number/rule`,
        method: "post",
        data: params,
    });
}
// 系统包装数量和 包装型号判断
export function settingdetail(params) {
    return request({
        url: `${base}/api/system/setting/detail`,
        method: "post",
        data: params,
    });
}

// 打印标签之前修改包装数量
export function reqModifyPackage(params) {
    return request({
        url: `${base}/api/waybill/goods/incubator/update`,
        method: "post",
        data: params,
    });
}

// 获取中通打印信息
export function reqZTInfo(params) {
    return request({
        url: `${base}/api/zto/printed_info/get`,
        method: "post",
        data: params,
    });
}

